
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main_mobile.xhtml" contentType="text/html"
	renderKitId="PRIMEFACES_MOBILE">
	<pm:page title="Ingredientes">
	
			<!-- Main View -->
			<pm:view id="main">
			
				<pm:header title="Ingredientes" swatch="b">
					<f:facet name="right">
						<p:button value="#{messages['button.new']}" icon="plus"
										 href="#{ingredienteListMB.nextView}"
										 actionListener="#{ingredienteListMB.clear}"/>
					</f:facet>
						<f:facet name="left">
						<p:button value="#{messages['main.app.title']}" icon="home"
										 href="./navigator.jsf"/>
					</f:facet>
				</pm:header>	
				<pm:content>
					<h:form>
						<!-- Edite o data list para deixar apenas um coommandLink -->
						<p:dataList id="list" var="bean" value="#{ingredienteListMB.resultList}">
						
							<h:outputText styleClass="ui-li-count" value="#{bean.id}" />
														
							<h:commandLink value="#{bean.nome}" action="#{ingredienteListMB.getNextView}">
								<f:param name="id" value="#{bean.id}" />
							</h:commandLink>
													
							<h:commandLink value="#{bean.imagem}" action="#{ingredienteListMB.getNextView}">
								<f:param name="id" value="#{bean.id}" />
							</h:commandLink>
							
							<!-- <h:graphicImage value="/image?id=#{bean.id}" /> -->
												
						</p:dataList>
						
					</h:form>
				</pm:content>
			</pm:view>
		</pm:page>
	
</f:view>